package org.jmc.refmanager.web.wicket.page.panel;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.panel.Panel;
import org.jmc.refmanager.web.wicket.form.ServiceViewForm;
import org.jmc.refmanager.web.wicket.model.ServiceModel;

/**
 */
public class ServiceViewPanel extends Panel {
	private static final long serialVersionUID = 1L;
//	private WebMarkupContainer dynamicPanel;
	
	/**
	 * 
	 * @param id
	 * @param model
	 */
	public ServiceViewPanel(String id, ServiceModel model, Class<? extends WebPage> pageOrigin) {
		super(id, model);

		ServiceViewForm viewForm = new ServiceViewForm("viewForm", model, pageOrigin);
		add(viewForm);

		/*
		dynamicPanel = new WebMarkupContainer("foo");
		dynamicPanel.setOutputMarkupId(true);
		add(dynamicPanel);
		
		final AbstractDefaultAjaxBehavior behave = new AbstractDefaultAjaxBehavior() {
		    protected void respond(final AjaxRequestTarget target) {
		        target.addComponent(new Label("foo", "Yeah I was just called from Javascript!"));
		    }
		};
		add(behave);
		//	System.out.println("CallbackUrl=" + behave.getCallbackUrl());
		 */
	}
}

